﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MT015 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagSubItemDefinition U0004;

    [Description("Rejection Reason")]
    public Tag405 RejectionReason_405
    {
      get
      {
        return new Tag405((SwiftElement) this, 0, (SwiftDefinitionElement) MT015.U0002);
      }
    }

    [Description("Rejection Reason")]
    public Tag405 Tag405_RejectionReason
    {
      get
      {
        return this.RejectionReason_405;
      }
    }

    public MT015()
      : base(true)
    {
    }

    public MT015(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT015.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT015.MessageDefinition = new SwiftMessageDefinition("MT015", "Delayed NAK");
      MT015.U0002 = new SwiftTagDefinition("RejectionReason_405", "Rejection Reason");
      MT015.U0002.TagName = "{405:";
      MT015.U0003 = new SwiftTagSubItemDefinition("ErrorCode", "Error Code");
      MT015.U0002.Elements.Add((SwiftDefinitionElement) MT015.U0003);
      MT015.U0004 = new SwiftTagSubItemDefinition("LineTag", "Line Tag");
      MT015.U0004.Mandatory = false;
      MT015.U0002.Elements.Add((SwiftDefinitionElement) MT015.U0004);
      MT015.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT015.U0002);
    }
  }
}
